import React, { PureComponent } from "react";
import { connect } from "react-redux";
import AccountManage from "components/My/AccountManage";
import {callApi} from 'app/utils'
export default class extends PureComponent {
  constructor(props) {
    super(props);
    this.state = {
      info:{}
    };
  }

  componentDidMount() {
    let that = this
    if(localStorage.getItem('userData')!=undefined&&localStorage.getItem('userData')!=null){
      callApi('/account/info',{token:JSON.parse(localStorage.getItem('userData')).token},"POST").then((data)=>{
        that.setState({
          info:data.data
        })
      })
    }
    
  }

  render() {
    return (
      <div>
        <AccountManage  info={this.state.info}/>
      </div>
    );
  }
}
